{include file="admin/common/header" /}
<body class="pear-container">
<div class="layui-card">
    <div class="layui-card-body">
        <table id="admin_table" lay-filter="admin_table"></table>
    </div>
</div>

<script type="text/html" id="barDemo">
    <button class="pear-btn pear-btn-primary pear-btn-sm" title="编辑配置"
            data-open="/app/huiblog/module/config/edit?id={{d.id}}"
            data-title="编辑配置" data-reload="2">
        <i class="layui-icon layui-icon-edit"></i>
    </button>
</script>
{include file="admin/common/footer" /}
<script>
  layui.use(['table', 'jquery'], function () {
    var $ = layui.jquery;
    var table = layui.table;
    table.render({
      elem: '#admin_table'
      , defaultToolbar: [{
        layEvent: 'refresh',
        icon: 'layui-icon-refresh',
        title: '刷新'
      }, 'filter']
      , method: 'get'
      , url: "/app/huiblog/module/config/index"
      , parseData: function (res) {
        return {
          "code": res.code,
          "msg": res.msg,
          "count": res.count,
          "data": res.data
        };
      }
      , cellMinWidth: 100
      , cols: [[
        {field: 'id', title: 'ID',align: 'center',width:100}
        , {field: 'title', title: '配置名称'}
        , {field: 'name', title: '配置标识（新增的模板文件名称需与标识名称一致）'}
        , {
          fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center'
        }
      ]]
      ,
      id: 'testReload'
      , page: true
      , limit: 15
    })
    ;

  });
</script>
</body>
</html>
